﻿package ${config.packageName}<#if table.packageName?exists>${table.packageName}</#if>${entity.packageName};

import com.jpgk.common.model.BaseModel;

/**
 * ${table.comment}实体类
 * 此类由IKForm平台自定义业务对象生成
 * @author Inkcar<inkcaridge@qq.com>
 * @since 1.0
 */
public class ${table.entityName} extends BaseModel{
	/**
	 * 创建实例静态工厂方法
	 * 
	 * @return ${table.entityName}
	 */
	public static ${table.entityName} newInstance() {
		return new ${table.entityName}();
	}

	private static final long serialVersionUID = 1L;
<#if table.primaryProperty?exists>
    /**
     * 主键字段
     */
    private ${table.primaryProperty.propertyType} ${table.primaryProperty.property};

    /**
    * 默认结构方法
    * 
    */
    public ${table.entityName}(){
     super();
    }
    
    /**
    * 主键构造方法
    * 
    * @param classId
    *            主键
    * 
    */
    public ${table.entityName}(${table.primaryProperty.propertyType} ${table.primaryProperty.property}){
     super();
     this.${table.primaryProperty.property}=${table.primaryProperty.property};
    }
    
	/**
	 * 设置${table.primaryProperty.comment}
	 * @param ${table.primaryProperty.property}
	 *            ${table.primaryProperty.comment}
	 <#if table.primaryProperty.description?exists>* @description ${table.primaryProperty.description}</#if>
	 */
	public void set${table.primaryProperty.property?cap_first}(${table.primaryProperty.propertyType} ${table.primaryProperty.property}){
		this.${table.primaryProperty.property}=${table.primaryProperty.property};
    }

    <#if table.primaryProperty.orignProperty?exists>
    /**
	 * 设置${table.primaryProperty.comment}
	 * @param ${table.primaryProperty.property}
	 *            ${table.primaryProperty.comment}
	 <#if table.primaryProperty.description?exists>* @description ${table.primaryProperty.description}</#if>
	 */
	public void set${table.primaryProperty.orignProperty?cap_first}(${table.primaryProperty.propertyType} ${table.primaryProperty.property}){
		this.${table.primaryProperty.property}=${table.primaryProperty.property};
    }
    /**
     * 获取${table.primaryProperty.comment}
     * @param ${table.primaryProperty.property}
     *            ${table.primaryProperty.comment}
     <#if table.primaryProperty.description?exists>* @description ${table.primaryProperty.description}</#if>
     */
    public ${table.primaryProperty.propertyType} get${table.primaryProperty.orignProperty?cap_first}(){
        return this.${table.primaryProperty.property};
    }
    
    </#if>
    
	/**
	 * 获取${table.primaryProperty.comment}
	 * @return ${table.primaryProperty.propertyType}
	 */
	public ${table.primaryProperty.propertyType} get${table.primaryProperty.property?cap_first}(){
		return this.${table.primaryProperty.property};
    }
    
</#if>
<#if table.propertys?exists> 
<#list table.propertys as prop>
    <#if prop.notBuild?exists && prop.notBuild==true>
    <#else>
    /**
     * ${prop.comment}
     */
    <#if prop.propertyType=="String"> 
    private ${prop.propertyType} ${prop.property}<#if prop.defaultValue?exists> = "${prop.defaultValue}"</#if>;
    <#elseif prop.type=="datetime"> 
    private ${prop.propertyType} ${prop.property};
    <#elseif prop.type=="decimal"> 
    private ${prop.propertyType} ${prop.property}<#if prop.defaultValue?exists> = new ${prop.propertyType}("${prop.defaultValue}")</#if>;
    <#elseif prop.type=="char"> 
    private ${prop.propertyType} ${prop.property}<#if prop.defaultValue?exists> = '${prop.defaultValue}'</#if>;
    <#else> 
    private ${prop.propertyType} ${prop.property}<#if prop.defaultValue?exists> = ${prop.defaultValue}<#if prop.propertyType=="Long">l<#elseif prop.propertyType=="Float">f<#elseif prop.propertyType=="Double">d</#if></#if>;
    </#if>
	/**
	 * 设置${prop.comment}
	 * @param ${prop.property}
	 *            ${prop.comment}
	 <#if prop.description?exists>* @description ${prop.description}</#if>
	 */
	public void set${prop.property?cap_first}(${prop.propertyType} ${prop.property}){
		this.${prop.property}=${prop.property};
    }
    <#if prop.orignProperty?exists>
    /**
	 * 设置${prop.comment}
	 * @param ${prop.property}
	 *            ${prop.comment}
	 <#if prop.description?exists>* @description ${prop.description}</#if>
	 */
	public void set${prop.orignProperty?cap_first}(${prop.propertyType} ${prop.property}){
		this.${prop.property}=${prop.property};
    }
    /**
     * 获取${prop.comment}
     * @param ${prop.property}
     *            ${prop.comment}
     <#if prop.description?exists>* @description ${prop.description}</#if>
     */
    /*public ${prop.propertyType} get${prop.orignProperty?cap_first}(){
        return this.${prop.property};
    }*/
    </#if>

	/**
	 * 获取${prop.comment}
     *
	 * @return ${prop.propertyType}
	 */
	public ${prop.propertyType} get${prop.property?cap_first}(){
		return this.${prop.property};
    }
    </#if>
</#list>
</#if>
}